package com.example.process.node.template;


import com.example.process.node.BaseTemplate;
import com.example.process.node.NodeContext;
import com.example.process.node.NodeProcessor;
import com.example.process.node.enums.ProcessTemplateEnum;
import com.example.process.node.tolerate.CargoInspectionNode;
import com.example.process.node.tolerate.SettlementNode;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
 * @author tangsen2333
 * @date 2022/6/15
 * @description 原料模板
 */
@Service
public class RawMaterialStandardTemplate extends BaseTemplate {

    @Override
    public Map<Integer, NodeProcessor> getNodeMap() {
        return ProcessTemplateEnum.RAW_MATERIAL_STANDARD_TEMPLATE.getNodeMap();
    }

    /***
     * @description: TODO 不能通用的逻辑,写模板内部类自行实现
     * @author ts2333
     * @date: 2022/6/16 9:19
     */
    @Service
    class Node1 extends SettlementNode {

        @Override
        public boolean pass(NodeContext context) {
            System.out.println("111111");
            return false;
        }

        @Override
        public boolean reject(NodeContext context) {
            return false;
        }

    }

    @Service
    class Node2 extends CargoInspectionNode {

        @Override
        public boolean pass(NodeContext context) {
            return false;
        }

        @Override
        public boolean reject(NodeContext context) {
            return false;
        }

    }

}

